package com.zf.shuashua.bean;

import android.text.TextUtils;

import java.io.Serializable;

public class ConfigAdvertOpen implements Serializable {

    //开屏广告误触设置：1：开启 0：关闭
    private int status;
    //关闭新用户误触：1：开启 0：关闭
    private int close_new;
    //关闭老用户误触：1：开启 0：关闭
    private int close_old;
    //开屏剩余几秒可跳过, 单位(秒)
    private String time;

    public boolean isOpen(){
        if(status == 1){
            return true;
        }
        return false;
    }

    public boolean isNewOpen(){
        if(close_new == 0){
            return true;
        }
        return false;
    }

    public boolean isOldOpen(){
        if(close_old == 0){
            return true;
        }
        return false;
    }

    public int getSkipTime(){
        if(TextUtils.isEmpty(time)){
            return 2;
        }
        return Integer.parseInt(time);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getClose_new() {
        return close_new;
    }

    public void setClose_new(int close_new) {
        this.close_new = close_new;
    }

    public int getClose_old() {
        return close_old;
    }

    public void setClose_old(int close_old) {
        this.close_old = close_old;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
